package Core;

import java.util.HashMap;
import java.util.Map;

public class CharacterCareerImpl implements CharacterCareer
{
	Map<Integer, CharacterClass> _levels;
	
	public CharacterCareerImpl()
	{
		this._levels = new HashMap<Integer, CharacterClass>();
	}
	
	@Override
	public int getLevelsIn(CharacterClass classToCheck)
	{
		int classCount = 0;
		
		for (int cursor = 0; cursor < _levels.size(); cursor++)
		{
			if (_levels.get(cursor).equivalentTo(classToCheck))
			{
				classCount++;
			}
		}

		return classCount;
	}

	@Override
	public void levelUp(CharacterClass newClass) 
	{
		this._levels.put(this._levels.size(), newClass);
	}
}